<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2 class="title">hello World</h2>
    <button class="btn">改版</button>
    <script>
        let message="hello World";
        let title1=document.getElementsByClassName("title")[0];
        title1.innerHTML=message
        const btnel=document.getElementsByClassName("btn")[0]
        btnel.addEventListener("click",(e)=>{
            title1.innerHTML="皮卡"
        })
    </script>
</body>
</html>